package com.oms.module.admin.controller;

import com.oms.common.ResponseDTO;
import com.oms.module.common.domain.MenuEntity;
import com.oms.module.common.service.MenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author zhanghailong QQ38592077
 * @Description TODO
 * @Date 2020/6/11 11:45
 */
@RestController
@RequestMapping("/admin/menu")
@Api(value = "管理端菜单管理")
public class MenuController {
    @Autowired
    MenuService menuService;

    @PostMapping("/getMenus")
    @ApiOperation( value = "管理端菜单 @author Zhang Hailong")
    public ResponseDTO<List<MenuEntity>> getMenus(){
        List<MenuEntity> list = menuService.getMenus();
        return ResponseDTO.succData(list);
    }
}
